package com.zhiyou.util;

public class PageUtil {
    private final int pageSize = 3 ;//每页数据数量
    private int pageNo;//当前页
    private int total;//总数
    private int pageNum;//总页数
    public  PageUtil(int pageNo,int total){
        this.pageNo=pageNo;
        this.total=total;
        this.pageNum=total%this.pageSize==0?total/this.pageSize:(total/this.pageSize+1);
    }

    public int getPageSize() {
        return pageSize;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }
}
